package reflectCus;

import reflectCus.annotations.AutoRunClass;

import java.lang.reflect.Method;
import java.util.Arrays;
@AutoRunClass
public class ReflectDemo1 {
    public static void main(String[] args) {
        Class  a=int.class;
        System.out.println(ReflectDemo1.class.getName());
        System.out.println(a.getName());
        Class b=String.class;
        System.out.println(b.getPackage().getName());
//        Method[]methods =b.getMethods();
//        for (int i=0;i<methods.length;i++){
//            System.out.println(methods[i]);
//        }
        System.out.println(b.getName());
        String.class.getName();
       ReflectDemo1 n=new ReflectDemo1();
        try {
            n.funs();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
    public void funs() throws ClassNotFoundException {

        System.out.println("自己自己:"+Class.forName(this.getClass().getName()));
    }
}
